package com.pig4cloud.pig.djjk.config;

import com.wd.ais.config.SenseAisConfig;
import com.wd.ais.service.AisEventsServiceImpl;
import com.wd.ais.service.AisLoginService;
import com.wd.ais.service.AisPortraitsServiceImpl;
import com.wd.ais.service.AisToolsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AisBeanConfig {
    @Autowired
    AisLoginService aisLoginService;
    @Bean
    public AisPortraitsServiceImpl aisPortraitsService1(){
        aisLoginService.setAisServer(SenseAisConfig.AisServer.server1);
        aisLoginService.initAis();
        AisPortraitsServiceImpl service = new AisPortraitsServiceImpl();
        return service;
    }

//    @Bean
//    public AisSystemService aisSystemService1(){
//        AisSystemService service = new AisSystemService();
//        service.setAisServer(SenseAisConfig.AisServer.server1);
//        return service;
//    }

    @Bean
    public AisEventsServiceImpl aisEventsService1(){
        AisEventsServiceImpl service = new AisEventsServiceImpl();
        return service;
    }

    @Bean
	public AisToolsService aisToolsService(){
		AisToolsService aisToolsService = new AisToolsService();
		return aisToolsService;
	}

}
